package com.hongli.blog.service.impl;

import com.hongli.blog.entity.AuthorityDao;
import com.hongli.blog.service.Authorityservice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @Author ZERO
 * @Date 2021/11/16 10:35
 **/
public class Authorityserviceimpl implements Authorityservice {

    @Autowired
    private Authorityservice authorityservice;

    @Override
    public List<AuthorityDao> SelectAllAuthority(){
        return authorityservice.SelectAllAuthority();
    }

    @Override
    public AuthorityDao SelectAuthorityName(String authorityname){
        return authorityservice.SelectAuthorityName(authorityname);
    }

    @Override
    @Transactional(rollbackFor = Exception.class)
    public void InsertAuthority(String authorityname, int subclass) {
        authorityservice.InsertAuthority(authorityname,subclass);
    }
}
